package com.hulk.ratel.notify.initializer;

import org.springframework.web.WebApplicationInitializer;
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
import org.springframework.web.servlet.DispatcherServlet;

import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletRegistration.Dynamic;

/**
 * @author 作者 cmt
 * @version 创建时间：2016年7月6日 下午4:47:23 类说明
 */

/**
public class WebInitializer implements WebApplicationInitializer {

	@Override
	public void onStartup(ServletContext servletContext) throws ServletException {
		AnnotationConfigWebApplicationContext actx = new AnnotationConfigWebApplicationContext();
		//actx.setDisplayName("");
		
		actx.register(WebMvcConfig.class);
		actx.setServletContext(servletContext);
		
		//actx.getServletContext().addFilter(arg0, arg1)
		//actx.getServletContext().addListener(arg0);
		Dynamic servlet = servletContext.addServlet("dispatcherServlet", new DispatcherServlet(actx));
		servlet.addMapping("/");
		//servletContext.addListener(new ContextLoaderListener());

		servlet.setLoadOnStartup(1);
		servlet.setAsyncSupported(true);
		//servlet.setInitParameter("webAppRootKey", "hulk.web.root");
		//request.getSession().setMaxInactiveInterval(30*60)
		
	}

}
 */
